<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>忘记密码</title>
    <link type="text/css" rel="stylesheet" href="css/password.css"/>
    <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
    <script src="/plugins/healthmobile.js"></script>
    <!--导入组件库-->
    <script src="/js/vue.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var height = $(document).height();
            $('.main').css('height', height);
        })
    </script>
</head>
<body>
<div id="app" class="main">
    <div class="main0">
        <div class="formBox">
            <h3>登录密码重置</h3>
            <ul>
                <li class="mainCol firLi">&gt;身份验证</li>
                <li>&gt;登录密码重置</li>
                <li class="lastLi">&gt;重置完成</li>
            </ul>
            <img src="images/line.png"/>
            <div class="itembox">
                <form method="post" :model="form" >
                    <label>手机号码&nbsp;:</label>
                    <input v-model="form.telephone" type="text" placeholder="请输入注册手机号"></span>

                </form>
            </div>
            <div class="btnBox">
<!--                <button onclick="window.location.href='password_2.html'">下一步</button>-->
                <button @click="submitTelephone()">下一步</button>
<!--                <el-button @click="submitTelephone()" type="primary">主要按钮</el-button>-->
            </div>
        </div>
    </div>
</div>

<div class="footer">
    <!--<div class="footer0">
       <div class="footer_l">使用条款 | 隐私保护</div>
       <div class="footer_r">© 2015 （杭州）金融信息服务有限公司    杭ICP备0000000号</div>
    </div> -->
</div>
</body>
<!--导入组件库-->
<script src="/js/vue.js"></script>
<script src="/js/axios-0.18.0.js"></script>
<script src="/plugins/elementui/index.js"></script>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            form: {
                telephone: '',
            }
        },
        methods: {
            submitTelephone() {
                //获取用户输入的手机号码
                var telephone = this.form.telephone;
                //校验手机号输入是否正确
                if (!checkTelephone(telephone)) {
                    this.$message.error('请输入正确的手机号');
                    return false;
                }
                axios.post("/user/findByTelephone.do?telephone=" + telephone).then((response) => {
                    if (!response.data.flag) {
                        //验证码发送失败
                        this.$message.error('验证码发送失败，请检查手机号输入是否正确')
                    } else {
                        window.location.href = "password_2.html?telephone=" + telephone;
                    }

                });
            },
        }
    })
</script>

</html>
